package com.workshop;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @author chengluqiang
 * @since 2019-02-27 18:20
 */
@SpringBootApplication
@MapperScan("com.workshop.dao")
@EnableSwagger2 //开启swagger
public class WorkShopApp extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(WorkShopApp.class,args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(WorkShopApp.class);
    }
}
